.class public Lcom/estrongs/android/ui/dialog/k;
.super Ljava/lang/Object;
.source "BatchRenameDialog.java"


# annotations
.annotation system Ldalvik/annotation/MemberClasses;
    value = {
        Lcom/estrongs/android/ui/dialog/k$e;
    }
.end annotation


# instance fields
.field private a:Lcom/estrongs/android/ui/dialog/k$e;

.field private b:Landroid/app/Activity;

.field private c:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List<",
            "Lcom/estrongs/fs/g;",
            ">;"
        }
    .end annotation
.end field

.field private d:Ljava/lang/String;


# direct methods
.method public constructor <init>(Les/sp;Ljava/util/List;Ljava/lang/String;)V
    .locals 1
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Les/sp;",
            "Ljava/util/List<",
            "Lcom/estrongs/fs/g;",
            ">;",
            "Ljava/lang/String;",
            ")V"
        }
    .end annotation

    .line 1
    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    const/4 v0, 0x0

    .line 2
    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    .line 3
    invoke-interface {p1}, Les/sp;->l()Landroid/app/Activity;

    move-result-object p1

    iput-object p1, p0, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    .line 4
    iput-object p2, p0, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    .line 5
    iput-object p3, p0, Lcom/estrongs/android/ui/dialog/k;->d:Ljava/lang/String;

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/k;)Landroid/app/Activity;
    .locals 0

    .line 2
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    return-object p0
.end method

.method private a(Landroid/content/DialogInterface;)V
    .locals 16

    move-object/from16 v1, p0

    .line 10
    iget-object v0, v1, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v0, v0, Lcom/estrongs/android/ui/dialog/k$e;->j:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    const/4 v2, 0x1

    const-string v3, ""

    if-eqz v0, :cond_0

    .line 11
    invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v5

    if-nez v5, :cond_0

    const/4 v5, 0x1

    goto :goto_0

    :cond_0
    const/4 v5, 0x0

    :goto_0
    if-eqz v5, :cond_1

    const-string v6, "."

    .line 12
    invoke-virtual {v0, v6}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v7

    if-nez v7, :cond_1

    .line 13
    new-instance v7, Ljava/lang/StringBuilder;

    invoke-direct {v7}, Ljava/lang/StringBuilder;-><init>()V

    invoke-virtual {v7, v6}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7, v0}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v7}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v0

    :cond_1
    move-object v6, v0

    .line 14
    iget-object v0, v1, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v0, v0, Lcom/estrongs/android/ui/dialog/k$e;->e:Landroid/widget/RadioButton;

    invoke-virtual {v0}, Landroid/widget/RadioButton;->isChecked()Z

    move-result v0

    const-string v7, "item_rename_new_name"

    if-eqz v0, :cond_9

    .line 15
    iget-object v0, v1, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v0, v0, Lcom/estrongs/android/ui/dialog/k$e;->h:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v8

    if-eqz v8, :cond_3

    .line 16
    invoke-virtual {v3, v8}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v0

    if-eqz v0, :cond_2

    goto :goto_2

    .line 17
    :cond_2
    :try_start_0
    invoke-static {v8}, Ljava/lang/Integer;->parseInt(Ljava/lang/String;)I

    move-result v0
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    goto :goto_1

    :catch_0
    move-exception v0

    move-object v9, v0

    .line 18
    invoke-virtual {v9}, Ljava/lang/Exception;->printStackTrace()V

    const/4 v0, 0x1

    .line 19
    :goto_1
    invoke-virtual {v8}, Ljava/lang/String;->length()I

    move-result v8

    goto :goto_3

    .line 20
    :cond_3
    :goto_2
    iget-object v0, v1, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    invoke-interface {v0}, Ljava/util/List;->size()I

    move-result v0

    invoke-static {v0}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/String;->length()I

    move-result v8

    const/4 v0, 0x1

    .line 21
    :goto_3
    iget-object v9, v1, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v9, v9, Lcom/estrongs/android/ui/dialog/k$e;->g:Landroid/widget/EditText;

    invoke-virtual {v9}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v9

    invoke-virtual {v9}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v9

    .line 22
    new-instance v10, Ljava/lang/StringBuilder;

    invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V

    const/4 v11, 0x0

    :goto_4
    if-ge v11, v8, :cond_4

    const-string v12, "0"

    .line 23
    invoke-virtual {v10, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    add-int/lit8 v11, v11, 0x1

    goto :goto_4

    .line 24
    :cond_4
    new-instance v8, Ljava/text/DecimalFormat;

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v10

    invoke-direct {v8, v10}, Ljava/text/DecimalFormat;-><init>(Ljava/lang/String;)V

    if-eqz v9, :cond_5

    .line 25
    invoke-virtual {v3, v9}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v10

    if-nez v10, :cond_5

    goto :goto_5

    :cond_5
    const/4 v2, 0x0

    :goto_5
    const/4 v10, 0x0

    .line 26
    :goto_6
    iget-object v11, v1, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    invoke-interface {v11}, Ljava/util/List;->size()I

    move-result v11

    if-ge v10, v11, :cond_e

    .line 27
    iget-object v11, v1, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    invoke-interface {v11, v10}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v11

    check-cast v11, Lcom/estrongs/fs/g;

    .line 28
    invoke-interface {v11}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v12

    invoke-static {v12}, Lcom/estrongs/android/util/h0;->z(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v12

    if-eqz v5, :cond_6

    move-object v13, v6

    goto :goto_7

    .line 29
    :cond_6
    invoke-interface {v11}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v13

    invoke-static {v13}, Lcom/estrongs/android/util/h0;->x(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v13

    :goto_7
    if-eqz v13, :cond_7

    goto :goto_8

    :cond_7
    move-object v13, v3

    .line 30
    :goto_8
    new-instance v14, Ljava/lang/StringBuilder;

    invoke-direct {v14}, Ljava/lang/StringBuilder;-><init>()V

    if-eqz v2, :cond_8

    move-object v12, v9

    :cond_8
    invoke-virtual {v14, v12}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    add-int v12, v0, v10

    move v15, v5

    int-to-long v4, v12

    .line 31
    invoke-virtual {v8, v4, v5}, Ljava/text/DecimalFormat;->format(J)Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v14, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v14, v13}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v14}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 32
    invoke-interface {v11, v7, v4}, Lcom/estrongs/fs/g;->a(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v10, v10, 0x1

    move v5, v15

    goto :goto_6

    :cond_9
    move v15, v5

    .line 33
    iget-object v0, v1, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v0, v0, Lcom/estrongs/android/ui/dialog/k$e;->f:Landroid/widget/RadioButton;

    invoke-virtual {v0}, Landroid/widget/RadioButton;->isChecked()Z

    move-result v0

    if-eqz v0, :cond_e

    .line 34
    iget-object v0, v1, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v0, v0, Lcom/estrongs/android/ui/dialog/k$e;->i:Landroid/widget/EditText;

    invoke-virtual {v0}, Landroid/widget/EditText;->getText()Landroid/text/Editable;

    move-result-object v0

    invoke-virtual {v0}, Ljava/lang/Object;->toString()Ljava/lang/String;

    move-result-object v0

    if-eqz v0, :cond_a

    .line 35
    invoke-virtual {v3, v0}, Ljava/lang/String;->equals(Ljava/lang/Object;)Z

    move-result v4

    if-nez v4, :cond_a

    goto :goto_9

    :cond_a
    const/4 v2, 0x0

    :goto_9
    const/4 v4, 0x0

    .line 36
    :goto_a
    iget-object v5, v1, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    invoke-interface {v5}, Ljava/util/List;->size()I

    move-result v5

    if-ge v4, v5, :cond_e

    .line 37
    iget-object v5, v1, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    invoke-interface {v5, v4}, Ljava/util/List;->get(I)Ljava/lang/Object;

    move-result-object v5

    check-cast v5, Lcom/estrongs/fs/g;

    .line 38
    invoke-interface {v5}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v8

    invoke-static {v8}, Lcom/estrongs/android/util/h0;->z(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v8

    if-eqz v15, :cond_b

    move-object v9, v6

    goto :goto_b

    .line 39
    :cond_b
    invoke-interface {v5}, Lcom/estrongs/fs/g;->getName()Ljava/lang/String;

    move-result-object v9

    invoke-static {v9}, Lcom/estrongs/android/util/h0;->x(Ljava/lang/String;)Ljava/lang/String;

    move-result-object v9

    :goto_b
    if-eqz v9, :cond_c

    goto :goto_c

    :cond_c
    move-object v9, v3

    .line 40
    :goto_c
    new-instance v10, Ljava/lang/StringBuilder;

    invoke-direct {v10}, Ljava/lang/StringBuilder;-><init>()V

    if-eqz v2, :cond_d

    move-object v11, v0

    goto :goto_d

    :cond_d
    move-object v11, v3

    :goto_d
    invoke-virtual {v10, v11}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v10, v8}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v10, v9}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    invoke-virtual {v10}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v8

    invoke-interface {v5, v7, v8}, Lcom/estrongs/fs/g;->a(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/Object;

    add-int/lit8 v4, v4, 0x1

    goto :goto_a

    .line 41
    :cond_e
    new-instance v0, Les/x60;

    iget-object v2, v1, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    iget-object v3, v1, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    iget-object v4, v1, Lcom/estrongs/android/ui/dialog/k;->d:Ljava/lang/String;

    invoke-direct {v0, v2, v3, v4}, Les/x60;-><init>(Landroid/app/Activity;Ljava/util/List;Ljava/lang/String;)V

    .line 42
    new-instance v2, Lcom/estrongs/android/ui/dialog/k$c;

    invoke-direct {v2, v1}, Lcom/estrongs/android/ui/dialog/k$c;-><init>(Lcom/estrongs/android/ui/dialog/k;)V

    .line 43
    new-instance v3, Lcom/estrongs/android/ui/dialog/k$d;

    invoke-direct {v3, v1}, Lcom/estrongs/android/ui/dialog/k$d;-><init>(Lcom/estrongs/android/ui/dialog/k;)V

    invoke-virtual {v0, v3}, Les/s80;->a(Les/y80;)V

    .line 44
    iget-object v3, v1, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    const v4, 0x7f1101bb

    invoke-virtual {v3, v4}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v3}, Les/s80;->a(Ljava/lang/String;)V

    .line 45
    invoke-virtual {v0, v2}, Les/s80;->a(Les/z80;)V

    .line 46
    new-instance v2, Lcom/estrongs/android/ui/dialog/a1;

    iget-object v3, v1, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    const v4, 0x7f1108f2

    invoke-virtual {v3, v4}, Landroid/app/Activity;->getString(I)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v2, v3, v4, v0}, Lcom/estrongs/android/ui/dialog/a1;-><init>(Landroid/app/Activity;Ljava/lang/String;Les/s80;)V

    const/4 v3, 0x0

    .line 47
    invoke-virtual {v2, v3}, Lcom/estrongs/android/ui/dialog/a1;->b(Z)Lcom/estrongs/android/ui/dialog/a1;

    invoke-virtual {v2}, Lcom/estrongs/android/ui/dialog/a1;->show()V

    .line 48
    invoke-virtual {v0}, Les/s80;->d()V

    .line 49
    invoke-interface/range {p1 .. p1}, Landroid/content/DialogInterface;->dismiss()V

    return-void
.end method

.method static synthetic a(Lcom/estrongs/android/ui/dialog/k;Landroid/content/DialogInterface;)V
    .locals 0

    .line 1
    invoke-direct {p0, p1}, Lcom/estrongs/android/ui/dialog/k;->a(Landroid/content/DialogInterface;)V

    return-void
.end method

.method static synthetic b(Lcom/estrongs/android/ui/dialog/k;)Ljava/lang/String;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/k;->d:Ljava/lang/String;

    return-object p0
.end method

.method static synthetic c(Lcom/estrongs/android/ui/dialog/k;)Ljava/util/List;
    .locals 0

    .line 1
    iget-object p0, p0, Lcom/estrongs/android/ui/dialog/k;->c:Ljava/util/List;

    return-object p0
.end method


# virtual methods
.method public a()V
    .locals 3

    .line 3
    new-instance v0, Lcom/estrongs/android/ui/dialog/k$e;

    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    invoke-direct {v0, p0, v1}, Lcom/estrongs/android/ui/dialog/k$e;-><init>(Lcom/estrongs/android/ui/dialog/k;Landroid/app/Activity;)V

    iput-object v0, p0, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    .line 4
    new-instance v0, Lcom/estrongs/android/ui/dialog/q$n;

    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/k;->b:Landroid/app/Activity;

    invoke-direct {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;-><init>(Landroid/content/Context;)V

    const v1, 0x7f1101bb

    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(I)Lcom/estrongs/android/ui/dialog/q$n;

    .line 5
    iget-object v1, p0, Lcom/estrongs/android/ui/dialog/k;->a:Lcom/estrongs/android/ui/dialog/k$e;

    invoke-virtual {v1}, Lcom/estrongs/android/view/h0;->j()Landroid/view/View;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(Landroid/view/View;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 6
    new-instance v1, Lcom/estrongs/android/ui/dialog/k$a;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/k$a;-><init>(Lcom/estrongs/android/ui/dialog/k;)V

    const v2, 0x7f11029e

    invoke-virtual {v0, v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->b(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 7
    new-instance v1, Lcom/estrongs/android/ui/dialog/k$b;

    invoke-direct {v1, p0}, Lcom/estrongs/android/ui/dialog/k$b;-><init>(Lcom/estrongs/android/ui/dialog/k;)V

    const v2, 0x7f110299

    invoke-virtual {v0, v2, v1}, Lcom/estrongs/android/ui/dialog/q$n;->a(ILandroid/content/DialogInterface$OnClickListener;)Lcom/estrongs/android/ui/dialog/q$n;

    .line 8
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q$n;->c()Lcom/estrongs/android/ui/dialog/q;

    .line 9
    invoke-virtual {v0}, Lcom/estrongs/android/ui/dialog/q$n;->b()V

    return-void
.end method
